home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / COP.ZIP / SHAPES.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-21  |  787 b   |  41 lines

  1. #include "shape.h"
  2. #include "rectpie.h"
  3. #include <conio.h>
  4.  
  5. main()
  6. {
  7.     Segment s;
  8.  
  9.     int gdriver = (int) DETECT, gmode, errorcode;
  10.     initgraph(&gdriver,&gmode,"\\borlandc\\bgi");
  11.     errorcode = graphresult();
  12.     if (errorcode != (int)grOk)  {
  13.         (void) cprintf("Graphics error: %s \n\r"
  14.             "Program Terminating",
  15.             grapherrormsg(errorcode));
  16.         exit(1);
  17.     }
  18.  
  19.     (void) SG_init(
  20.       (&s,1,0,0,3,
  21.         CR_ShapeThiS_0(CR_new_default()),
  22.         RT_ShapeThiS_0(RT_new_default()),
  23.         SG_ShapeThiS_0(SG_init(
  24.           ((Segment *)0,1,20,20,2,
  25.         PS_ShapeThiS_0(PS_new_default()),
  26.         RT_ShapeThiS_0(RT_new_default())
  27.           )
  28.         ))
  29.       )
  30.     );
  31.  
  32.  
  33.     SG_show_default(&s);
  34.     SG_show(&s,getmaxx()/2,getmaxy()/2,2);
  35.  
  36.     SG_destruct(&s);
  37.     (void) getch();
  38.     closegraph();
  39.     return 0;
  40. }
  41.